<div class="panel panel-default" ng-controller="ItemCtrl">
	<div class="panel-heading">系统管理 / 通知项管理</div>
	<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
	<div class="row wrapper m-n">
		<form class="bs-example form-horizontal ng-pristine ng-valid">
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.code" class="form-control" placeholder="编码">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<input type="text" ng-model="queryMap.name" class="form-control" placeholder="名称">
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<div class="input-group">
						<ui-select ng-model="module.selected" theme="bootstrap">
							<ui-select-match placeholder="所属模块">{{$select.selected.name}}</ui-select-match>
							<ui-select-choices repeat="m in module | propsFilter: {name: $select.search}">
								<span ng-bind-html="m.name| highlight: $select.search"></span>
							</ui-select-choices>
						</ui-select>
						<span class="input-group-btn">
							<button ng-click="module.selected = undefined" class="btn btn-default">
								<span class="glyphicon glyphicon-trash"></span>
							</button>
						</span>
					</div>
				</div>
			</div>
			<div class="form-group col-md-3">
				<div class="col-md-11">
					<button type="button" class="btn btn-info" ng-click="query()">查询</button>
				</div>
			</div>
		</form>
	</div>
	<div class="table-responsive">
		<table class="table table-striped b-t b-light">
			<thead>
				<tr>
					<th style="width:10px;"></th>
					<th style="width:100px;">编码</th>
					<th style="width:100px;">名称</th>
					<th style="width:100px;">所属模块</th>
					<th style="width:100px;">模版可用参数</th>
					<th style="width:80px;">发短信</th>
					<th style="width:80px;">发微信消息</th>
					<th style="width:80px;">发推送消息</th>
					<th style="width:80px;">通知开关</th>
					<th style="width:80px;"></th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="item in itemList">
					<td></td>
					<td>{{item.code}}</td>
					<td>{{item.name}}</td>
					<td>{{item.moduleId | moduleFilter}}</td>
					<td>{{item.parameters}}</td>
					<td>
						<label class="i-switch bg-info m-t-xs m-r">
							<input type="checkbox" ng-checked="item.sms" ng-click="sms(item)" ng-readonly="noAuth">
							<i></i>
						</label>
					</td>
					<td>
						<label class="i-switch bg-info m-t-xs m-r">
							<input type="checkbox" ng-checked="item.wx" ng-click="wx(item)" ng-readonly="noAuth">
							<i></i>
						</label>
					</td>
					<td>
						<label class="i-switch bg-info m-t-xs m-r">
							<input type="checkbox" ng-checked="item.jpush" ng-click="jpush(item)" ng-readonly="noAuth">
							<i></i>
						</label>
					</td>
					<td>
						<label class="i-switch bg-info m-t-xs m-r">
							<input type="checkbox" ng-checked="item.enabled" ng-click="switch(item)" ng-readonly="noAuth">
							<i></i>
						</label>
					</td>
					<td>
						<center>
							<a href tooltip="通知内容模板">
								<i class="fa fa-pencil-square-o fa-fw m-r-xs" ng-click="tpl(item)"></i>
							</a>
						</center>
					</td>
				</tr>
				<tr ng-show="itemList.length == 0">
					<td colspan="8" style="text-align: center;">暂无通知项信息</td>
				</tr>
			</tbody>
		</table>
	</div>
	<page-footer/>
</div>